﻿// C++头文件
#include <iostream>
#include <list>
// Linux头文件
#include <limits.h>
// 三方库头文件
#include "glog/logging.h"
// 自定义头文件
#include "file_common.h"
#include "packet.h"
#include "networkcaptor.h"

using namespace std;

static void InitGlog(char *argv0)
{
	// 初始化glog
	google::InitGoogleLogging(argv0);
	FLAGS_alsologtostderr = 0;// 将日志同时输出到stderr
	FLAGS_minloglevel = google::INFO;// 设置日志输出等级

	// 创建日志路径
	char logDir[PATH_MAX] = "./../log";
	realpath(logDir, logDir);
	if(!CreateFloderIfNotExist(logDir)){
		FLAGS_log_dir = logDir;
	} else {
		LOG(ERROR) << "set log path failed, use default log path." << endl;
	}
}

int main(int argc, char** argv)
{
	InitGlog(argv[0]);

	list<string> interface{};
	NetworkCaptor netCaptor(interface);

	return 0;
}